package com.my.hp_hr.service.liuhao_service;

import com.my.hp_hr.dao.liuhao_dao.AttendanceDao;
import com.my.hp_hr.entity.liuhao_entity.Attendance;
import com.my.hp_hr.entity.liuhao_entity.Employee;

import java.util.List;

public class AttendanceService {
    public AttendanceDao dao=new AttendanceDao();
    public List<Attendance> selectAttendancePageList(int number) throws Exception {
        List<Attendance> attendanceList = dao.selectAttendancePageList(number);
        for (Attendance attendance:attendanceList){
            int employee_number=attendance.getEmployee_number();
            Employee employee = dao.selectEmployeeByEmployee_number(employee_number);
            attendance.setEmployee(employee);
        }
        return attendanceList;
    }
}
